/**
 * Created by hcadmin on 16/4/7.
 */
define([
    "jquery",
    "IO",
    "bootbox"
], function ($, IO, bootbox) {

    $(function () {
        $("#btnSave").click(function(){
            var compName1=$('.row2-input').val();
            var compName2=$('.row3-input').val();
            var compName3=$('.row4-input').val();
            var compName4=$('.row5-input').val();
            var compName5=$('.row6-input').val();
            var compName6=$('.row7-input').val();
            var activity_mid=localStorage.getItem("activity_mid");
            var params={};
            params.group_name1=compName1;
            params.group_name2=compName2;
            params.group_name3=compName3;
            params.group_name4=compName4;
            params.group_name5=compName5;
            params.group_name6=compName6;
            params.activity_mid=activity_mid;

            if(compName1!=""&&compName2!=""&&compName3!=""&&compName4!=""&&compName5!=""&&compName6!=""){

                IO.post("/shapan/api/newCompany",params,function(d){
                    if(d.code=="0"){
                        alert(d.msg);
                    }
                })
            }
            else {
                alert("请输入6组信息");
            }
        });

    });

});